﻿using Admin.NET.Core;

namespace Admin.NET.Application.Entity;

/// <summary>
/// 网关信息
/// </summary>
[SugarTable("DeviceGateWay", "网关信息")]
public class DeviceGateWay : EntityBaseData
{
    /// <summary>
    /// 设备编号
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "DeviceNo", ColumnDescription = "设备编号", Length = 60)]
    public string DeviceNo { get; set; }

    /// <summary>
    /// 机构Id
    /// </summary>
    [SugarColumn(ColumnDescription = "机构Id")]
    public long OrgId { get; set; }

    /// <summary>
    /// 机构
    /// </summary>
    [Newtonsoft.Json.JsonIgnore]
    [System.Text.Json.Serialization.JsonIgnore]
    [Navigate(NavigateType.OneToOne, nameof(OrgId))]
    public SysOrg SysOrg { get; set; }

    /// <summary>
    /// 网关名称
    /// </summary>
    [SugarColumn(ColumnName = "GateWayName", ColumnDescription = "网关名称", Length = 100)]
    public string GateWayName { get; set; }

    /// <summary>
    /// 设备地址
    /// </summary>
    [SugarColumn(ColumnName = "DeviceAddress", ColumnDescription = "设备地址", Length = 200)]
    public string DeviceAddress { get; set; }

    /// <summary>
    /// 设备位置
    /// </summary>
    [SugarColumn(ColumnName = "DevicePosition", ColumnDescription = "设备位置", Length = 50)]
    public string DevicePosition { get; set; }

    /// <summary>
    /// 设备位置类型
    /// </summary>
    [SugarColumn(ColumnName = "DevicePositionType", ColumnDescription = "设备位置类型")]
    public DevicePositionType DevicePositionType { get; set; } = 0;

    /// <summary>
    /// 序列号
    /// </summary>
    [SugarColumn(ColumnName = "Sn", ColumnDescription = "序列号", Length = 60)]
    public string Sn { get; set; }

    /// <summary>
    /// 密码
    /// </summary>
    [SugarColumn(ColumnName = "Pwd", ColumnDescription = "密码", Length = 60)]
    public string Pwd { get; set; }

    /// <summary>
    /// 设备启用状态
    /// </summary>
    [SugarColumn(ColumnName = "DeviceEnableStatus", ColumnDescription = "启用状态")]
    public DeviceEnableStatus DeviceEnableStatus { get; set; } = 0;

    /// <summary>
    /// 设备重量
    /// </summary>
    [SugarColumn(ColumnName = "DeviceWeight", ColumnDescription = "设备排序")]
    public int DeviceWeight { get; set; } = 0;

    /// <summary>
    /// 设备功能监控
    /// </summary>
    [SugarColumn(ColumnName = "DeviceFuncMonitor", ColumnDescription = "功能监控")]
    public bool DeviceFuncMonitor { get; set; } = false;

    /// <summary>
    /// 云网穿透
    /// </summary>
    [SugarColumn(ColumnName = "DeviceFuncCloud", ColumnDescription = "云网穿透")]
    public bool DeviceFuncCloud { get; set; } = false;

    /// <summary>
    /// 激活状态
    /// </summary>
    [SugarColumn(ColumnName = "Active", ColumnDescription = "激活状态")]
    public Active Active { get; set; }
}